<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('inspection_records_result', function (Blueprint $table) {
            $table->comment('日常巡检结果详细信息');
            $table->bigIncrements('id');
            $table->unsignedBigInteger('inspection_record_id')->nullable(false)->comment('记录ID');
            $table->unsignedBigInteger('device_id')->nullable(false)->comment('设备ID');
            $table->string('photo')->nullable()->comment('图片');
            $table->text('remark')->nullable()->comment('备注');
            $table->unsignedTinyInteger('status')->nullable(false)->comment('状态1：正常2：异常');
            $table->datetimes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('inspection_records_result');
    }
};
